proc msg:addchan {nick host handle arg} {
  global botnick   

  set otbn1 [lindex $arg 0]

  # if user is not a global user
  if {![matchattr $handle o]} {
    putquick "NOTICE $nick :\0034ERROR - Permission Denied."
    return 0
  }
  
  # if user is not authenticated
  if {![matchattr $handle A]} {
    putquick "NOTICE $nick :\0034ERROR - You need to authenticate first - Permission Denied."           
    putquick "NOTICE $nick :\00312You may authenticate yourself by typing \0033\002/msg $botnick auth <your password>\002"
    return 0
  }

  # if user is disabled
  if {[matchattr $handle D]} {
    putquick "NOTICE $nick :\0034ERROR - Permission Denied - Access Is Disabled."
    return 0
  }

  addchan $nick $otbn1 $host $handle
  return 0
}









